package com.xx.springboot.designPattern.FactoryMode;/**
 * Created by xiaoxiunique on 2018-11-15.
 */

/**
 * <p>
 * TODO:
 * </p>
 *
 * @author hcg
 * @date 2018-11-15 15:39
 * @className NYPizzaStore
 */
public class NYPizzaStore extends PizzaStore {
    @Override
    Pizza createPizza(String type) {
        // cheese 起司
        if ("cheese".equals(type)) {
            return new NYStyleCheesePizza();
        }
        // veggie 素食主义者
        else if ("veggie".equals(type)) {
            return new NyStyleVeggiePizza();
        }
        // clam 蛤
        else if ("clam".equals(type)) {
            return new NyStyleClamPizza();
        }
        // pepperoni 意大利辣味香肠
        else if ("pepperoni".equals(type)) {
            return new NyStylePepperoniPizza();
        }
        return null;
    }

}
